package com.kgc.sbt.exception;

/**
 * Created on 2021/6/1.
 * <p>
 * Author: GongMingJie
 * <p>
 * Description: 系统自定义异常枚举
 */
public enum UserExceptionEnum {

    /**
     * 系统异常
     */
    SYSTEM_EXCPT("9000","系统异常"),

    /**
     * 传入参数为空
     */
    REQUEST_PARAM_EMPTY("1001","传入参数为空"),

    /**
     * 传入参数非法
     */
    REQUEST_PARAM_ILLEGAL("1002","传入参数非法"),

    /**
     * 数据库异常
     */
    DATABASE_OPRRATOR_EXCPT("3001","数据库操作异常"),

    /**
     * 网络异常
     */
    NETWORK_CONNECT_EXCPT("5001","网络连接异常"),

    /**
     * token为空，权限不足，请重新登录
     */
    TOKEN_NULL_EXCPT("5002","token为空，权限不足，请重新登录"),

    /**
     * token非法或者已失效
     */
    TOKEN_OUT_EXCPT("5003","token非法或者已失效");


    /**
     * 异常码
     */
    private String excptCode;

    /**
     * 异常说明
     */
    private String excptMsg;

    /**
     * 带参构造方法
     */
    UserExceptionEnum(String excptCode, String excptMsg){
        this.excptCode = excptCode;
        this.excptMsg = excptMsg;
    }

    public String getExcptCode() {
        return excptCode;
    }

    public String getExcptMsg() {
        return excptMsg;
    }
}
